<?php 
$data['page_selected'] = 'reports';
$this->load->view('constants/header', $data);?>

<div id="site_content">
	<?php $this->load->view('constants/sidebar'); ?> 
    <div id="content">
        <!-- insert the page content here -->
        <h3>Reportes</h3>
        <form action="<?php echo base_url(); ?>activity/new_report/<?php echo change2ymd($date_start); ?>/<?php echo change2ymd($date_end); ?>" method="post">
            <h1 align="center">Nuevo reporte semanal</h1>
            <h2>Fecha</h2>
            <p>Semana desde <input type="text" readonly="readonly" name="date_start" id="date_start" value="<?php echo $date_start; ?>"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                hasta <input type="text" readonly="readonly" name="date_end" id="date_end" value="<?php echo $date_end; ?>"/>
            </p>
            
            <h2>Actividad</h2>
            <?php echo form_error('activity'); ?>
            <table align="center">
                <tr>
                	<td>
                    	Tipo
                    </td>
                    <td>
                    	<select id="type" name="type">
							<option value="-">--------------------------------</option>
                            <?php foreach($types as $t){ ?>
                            	<option value="<?php echo $t['cod_actividad']; ?>" <?php echo set_select('type', $t['cod_actividad']); ?> >
									<?php echo $t['descripcion']; ?>
                                </option>
                            <?php } ?>
                        </select>
                    </td>
                    <td>
                    	<?php echo form_error('type'); ?>
                    </td>
                </tr>
                <tr>
                	<td>
                    	Descripci&oacute;n
                    </td>
                    <td>
                    	<textarea id="description" name="description" cols="17" rows="8"><?php echo set_value('description'); ?></textarea>
                    </td>
                    <td>
                    	<?php echo form_error('description'); ?>
                    </td>
                </tr>
                <tr>
                	<td>
                		Lugar
                    </td>
                    <td>
                    	<input type="text" id="location" name="location" value="<?php echo set_value('location'); ?>"/>
                    </td>
                    <td>
                    	<?php echo form_error('location'); ?>
                    </td>
                </tr>
                <tr>
                	<td>
                    	Medio
                    </td>
                    <td>
                    	<input type="text" id="mean" name="mean" value="<?php echo set_value('mean'); ?>"/>
                    </td>
                    <td>
                    	<?php echo form_error('mean'); ?>
                    </td>
                </tr>
            </table>
            <p><input type="submit" name="button" class="submit" value="Cargar reporte" /></p>
        </form>
    </div>
</div>
<?php $this->load->view('constants/footer'); ?>